package com.eight.travel.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResp {

    private Integer code;
    private String msg;
    private Object data;
    private Integer total;

    public BaseResp SUCCESS(String msg,Object data,Integer total){
        return new BaseResp(1,msg,data,total);
    }
    public BaseResp SUCCESS2(String msg){
        return new BaseResp(1,msg,null,null);
    }
    public BaseResp FAIL(String msg){
        return new BaseResp(0,msg,null,null);
    }
}
